aboutsummaryrefslogtreecommitdiff
path: root/src/routes/user/[user]/+page.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-23 21:26:36 -0800
committerFuwn <[email protected]>2026-01-23 21:26:36 -0800
commite30cc3795166a372876969fd83b813472043b48b (patch)
treefc672e36c5d64a804963029a9fe8cc413fc4c220 /src/routes/user/[user]/+page.svelte
parentfix(stores): Use unknown cast for dynamic property access (diff)
downloaddue.moe-e30cc3795166a372876969fd83b813472043b48b.tar.xz
due.moe-e30cc3795166a372876969fd83b813472043b48b.zip
fix: Add null guards and improve error messaging for user lookups
Diffstat (limited to 'src/routes/user/[user]/+page.svelte')
-rw-r--r--src/routes/user/[user]/+page.svelte4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte
index 7f33f170..eeeebf91 100644
--- a/src/routes/user/[user]/+page.svelte
+++ b/src/routes/user/[user]/+page.svelte
@@ -26,7 +26,9 @@
export let data;
$: ({ Profile } = data);
- $: preferences = $Profile.fetching ? undefined : ($Profile.data?.User.preferences as Preferences);
+ $: preferences = $Profile.fetching
+ ? undefined
+ : ($Profile.data?.User?.preferences as Preferences | undefined);
const setCategoriesQuery = graphql(`
mutation SetCategories($categories: [String!]!) {